<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div {
            width: 500px;
            margin: 0 auto;
        }
        div table td {
            width: 20px;
            height: 20px;
            border-collapse: collapse;
        }
    </style>
</head>
<body>
<table border="1">
    <tr>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
    </tr>
    <tr>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
    </tr>
    <tr>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
    </tr>
</table>
<div id="box">

</div>
<script>
    var i = 0;
    var j = 10;
    while (i<j){
        console.log(i);
        i++;
        j--;
    }









    console.log('***************');
    i = 1;
    while (i<=9){
        var s = '第'+i+'行';

        j = 1;
        while (j<=i){
            s += '__'+j;
            j++;
        }
        console.log(s);
        i++
    }
</script>
</body>
</html>